home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / MovieToolBox / CallAdobePremiere.c next >
Encoding:
C/C++ Source or Header  |  1994-02-08  |  2.2 KB  |  93 lines  |  [TEXT/KAHL]

  1.  
  2. #include "Interface-Bottlenecks.h"
  3. #include "Interface-Effect.h"
  4. #include <Memory.h>
  5. #include "gGlobals.h"
  6.  
  7. pascal void StretchBits(BitMap *srcBits, BitMap* dstBits,
  8.                             Rect *srcRect, Rect *dstRect, short mode, RgnHandle maskRgn)
  9. {
  10.     CopyBits(srcBits,dstBits,srcRect,dstRect,mode,maskRgn);
  11. }
  12.  
  13.  pascal void DistortPolygon(GWorldPtr src, GWorldPtr dest, Rect *srcbox, Point *dstpts)
  14. {
  15.  
  16.  
  17. }
  18.  pascal void PolyToPoly(GWorldPtr src, GWorldPtr dest, Point *srcpts, Point *dstpts)
  19. {
  20.  
  21.  
  22. }
  23.  
  24.  pascal void AudStretch(Ptr src, long srclen, Ptr dest, long destlen, short flags)
  25. {
  26.  
  27.  
  28. }
  29.  
  30.  pascal void AudMix(Ptr buf1, long v1, Ptr buf2, long v2, Ptr buf3, long v3,
  31.                         long width, Ptr dest, short flags)
  32. {
  33.  
  34.  
  35. }
  36.  
  37. /**********
  38.     This routine allocated the Adobe Premiere V2.0 data structures and 
  39.     fill in some of the constants for calling Premiere Effect Modules.
  40. ***********/
  41.  
  42. EffectHandle SetUpAdobeCall(short direction)
  43. {    BottleRec *p;
  44.     EffectHandle theData;
  45.     short direct;
  46.     
  47.     theData = (EffectHandle) NewHandleClear(sizeof(EffectRecord));
  48.     if (theData) {
  49.         p = (BottleRec *) NewPtrClear(sizeof(BottleRec));
  50.         (*theData)->bottleNecks = p;
  51.         p->StretchBits = StretchBits;
  52.         p->count = 1;
  53.         
  54.         (*theData)->total = gNumberSteps;
  55.         (*theData)->part = 1;
  56.         (*theData)->source1 = gWorld;
  57.         (*theData)->source2 = gAltWorld;
  58.         (*theData)->destination = gDstWorld;
  59.         (*theData)->reverse    = gReverse;
  60.         
  61.         switch(direction) {
  62.             case EFFECT_Roll_Left:    direct = bitLeft;    break;
  63.             case EFFECT_Roll_Right:    direct = bitRight;    break;
  64.             case EFFECT_Roll_Down:    direct = bitBottom;    break;
  65.             case EFFECT_Roll_Up:    direct = bitTop;    break;
  66.             
  67.             case EFFECT_Roll_UpperRight:    direct = bitUpperRight;    break;
  68.             case EFFECT_Roll_LowerRight:    direct = bitLowerRight;    break;
  69.             case EFFECT_Roll_LowerLeft:        direct = bitLowerLeft;    break;
  70.             case EFFECT_Roll_UpperLeft:        direct = bitUpperLeft;    break;
  71.             }
  72.         (*theData)->arrowFlags = direct;
  73.         }
  74.         return theData;
  75. }    /* End of Setup */
  76.  
  77. void CleanUpAdobeCall(EffectHandle theData)
  78. {
  79.     BottleRec *p;
  80.     
  81.     if (theData) {
  82.         if ((*theData)->bottleNecks) DisposePtr((*theData)->bottleNecks);
  83.         DisposHandle(theData);
  84.     }    
  85. }    /* End of () */
  86.  
  87. short AdobeStageCall(long stageNum, EffectHandle theData)
  88. {
  89.     (*theData)->part = stageNum;
  90.     return xEffectWipe(esExecute,  theData);    
  91.  
  92. }
  93.